/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package botoseis.mainGui.database;

import java.sql.Connection;
import java.sql.DriverManager;
import javax.swing.JOptionPane;

/**
 *
 * @author wogonowski
 */
public class DBConnect {

    private static String url = "jdbc:h2:"+botoseis.mainGui.utils.Utils.getBotoseisROOT()+"/bin/database/seismic;SCHEMA=PUBLIC;DB_CLOSE_DELAY=10";
    private static String user = "sa";
    private static String password = "";
    Connection con=null;
    public static Connection ConnectDb(){
     
        try {
            
            Class.forName("org.h2.Driver").newInstance();
            Connection con = DriverManager.getConnection(url,user,password);
        return con;
        }
        catch(Exception e)
        {
           JOptionPane.showMessageDialog(null, e);
           return null;
        } 
    }

}
    
